<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增患者基本信息')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-patient-add">
            <input type="hidden" name="patiDiaId" id="patDiaId" th:value="${diaId}">
            <input type="hidden" name="patiAdmType" id="patiAdmType" th:value="${admType}">
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">登记号：</label>
                        <div class="col-sm-8">
                            <input name="patNo" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">患者姓名：</label>
                        <div class="col-sm-8">
                            <input name="patName" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">生日：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="patBirth" class="form-control time-input" placeholder="yyyy-MM-dd" type="text">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">性别：</label>
                        <div class="col-sm-8">
                            <select name="patSex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">婚姻：</label>
                        <div class="col-sm-8">
                            <select name="patMarriage" class="form-control m-b" th:with="type=${@dict.getType('pat_marriage')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">职业：</label>
                        <div class="col-sm-8">
                            <select name="patCareer" tags class="form-control m-b" th:with="type=${@dict.getType('pat_career')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>


            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">民族：</label>
                        <div class="col-sm-8">
                            <select name="patNation" tags class="form-control m-b" th:with="type=${@dict.getType('pat_nation')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">户籍：</label>
                        <div class="col-sm-8">
                            <select name="patDomicile" tags class="form-control m-b" th:with="type=${@dict.getType('pat_domicile')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">学历：</label>
                        <div class="col-sm-8">
                            <select name="patEducation" tags class="form-control m-b" th:with="type=${@dict.getType('pat_education')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">医保类型：</label>
                        <div class="col-sm-8">
                            <select name="patInsu" tags class="form-control m-b" th:with="type=${@dict.getType('pat_insu')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">身高(cm)：</label>
                        <div class="col-sm-8">
                                <input type="text" class="form-control" name="patHeight">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">体重(kg)：</label>
                        <div class="col-sm-8">
                                <input type="text" class="form-control" name="patWeight">
                        </div>
                    </div>
                </div>
            </div>


            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">身份证：</label>
                        <div class="col-sm-8">
                            <input name="patIdCard" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">电话：</label>
                        <div class="col-sm-8">
                            <input name="patTel" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">联系人：</label>
                        <div class="col-sm-8">
                            <input name="patContact" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">联系人电话：</label>
                        <div class="col-sm-8">
                            <input name="patContactTel" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-2 control-label">地址：</label>
                <div class="col-sm-10">
                    <input name="patAddress" class="form-control" type="text">
                </div>
            </div>


            <div class="form-group">    
                <label class="col-sm-2 control-label">诊断：</label>
                <div class="col-sm-10">
                    <textarea name="patDiagnosis" class="form-control" ></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">主诉：</label>
                <div class="col-sm-10">
                    <textarea name="patChiefComplaint" class="form-control"></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">首诊医师：</label>
                <div class="col-sm-10">
                    <input name="patDoctor" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "disease/patient"
        $("#form-patient-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-patient-add').serialize());
            }
        }
    </script>
</body>
</html>